<template>
<div>
<ChildCom ref=" childRef" ></ChildCom>
<button @ click=" sendMessage">Send Message To Child</button>
</div>
</template>
<script>
import ChildCom frm './components/ChildCom. vue';
export default{
    components:{
        ChildCom
    },
    methods:{
        sendMessage(){
            this.$refs.childRef.receiveMessage('Hello from parent' );
        }
    }
};
</script>